//
//  FSWSegmentedControlLabel.m
//  quhuolang_driver
//
//  Created by 曹欣欣 on 2018/3/15.
//  Copyright © 2018年 fusw. All rights reserved.
//

#import "FSWSegmentedControlLabel.h"

@implementation FSWSegmentedControlLabel
-(void)awakeFromNib{
    [super awakeFromNib]; 
    
}


+(instancetype)headView{
    return [[[NSBundle mainBundle]loadNibNamed:@"FSWSegmentedControlLabel" owner:nil options:nil]lastObject];
}
 
-(void)show:(NSString *)title andSub:(NSString *)sub andControlButton:(controlButton)block{
    self.block = block;
    self.subLabel.text = [NSString stringWithFormat:@"%@单",sub];
    self.titleLabel.text = title;
}

-(void)sublabel:(NSString *)sub{
    self.subLabel.text = [NSString stringWithFormat:@"%@单",sub];
}
- (IBAction)button:(UIButton *)sender {
    if (self.block) {
        self.block(sender);
    }
}
@end
